package com.yixin.hospital.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum GuidanceTypeEnum {

    LOCAL(1, "店面就诊"),
    POST(2, "邮寄"),
    PROXY_TAKE(3, "代取"),
    PROXY_PUT(4, "代放"),
    ;

    private int code;
    private String desc;


    public static String getDesc(int code) {
        for (GuidanceTypeEnum guidanceEnum : GuidanceTypeEnum.values()) {
            if (guidanceEnum.getCode() == code) {
                return guidanceEnum.getDesc();
            }
        }
        return "";
    }

}
